<template>
	<view :class="['common-navigation',{'subHeight':subTitle}]">
		<image :class="['common-navigation_bg',{'subHeight':subTitle}]" src="/static/image_navbg.png"></image>
		<view class="title">
			<uni-icons type="arrow-left" color='#fff' size="20" @click="leftBack"></uni-icons>
			{{title}}
			<view class="sub-title" v-if="subTitle">
				{{subTitle}}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			title: {
				type: String,
				default: ''
			},
			subTitle: {
				type: String,
				default: ''
			}
		},
		methods:{
			leftBack(){
				uni.navigateBack({
					delta: 1
				});
			}
		}
	}
</script>

<style scoped>
	.common-navigation {
		width: 100%;
		height: 176rpx;
		position: relative;
		overflow: hidden;
	}

	.common-navigation_bg {
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
		height: 176rpx;
	}

	.subHeight {
		width: 100%;
		height: 294rpx;
	}

	.title {
		position: absolute;
		left: 36rpx;
		top: 110rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 34rpx;
		color: #FFFFFF;
		line-height: 40rpx;
	}

	.sub-title {
		padding-top: 50rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #FFFFFF;
		line-height: 33rpx;
	}
</style>